﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Eatime.Entitys
{
    public class ShopReviewData : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private List<ShopReview> rows;
        public List<ShopReview> Rows 
        { 
            get { return rows; }
            set
        {
            if (value!=rows)
            {
                rows = value;
                NotifyPropertyChanged("Rows");
            }
        }
        }

        private string message = string.Empty;
        public string Message { get { return message; }
            set
            {
                if (value != message)
                {
                    message = value;
                    NotifyPropertyChanged("Message");
                }
            }
        }

        private int total=0;
        public int Total
        {
            get { return total; }
            set
            {
                if (value != total)
                {
                    total = value;
                    NotifyPropertyChanged("Total");
                }
            }
        }

        private int pageIndex = 0;

        public int PageIndex
        {
            get { return pageIndex; }
            set
            {
                if (value != pageIndex)
                {
                    pageIndex = value;
                    NotifyPropertyChanged("PageIndex");
                }
            }
        }
        private int pageSize=0;
        public int PageSize
        {
            get { return pageSize; }
            set
            {
                if (value != pageSize)
                {
                    pageSize = value;
                    NotifyPropertyChanged("PageSize");
                }
            } }
        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
    }
}
